class Student(object):
    __slots__ = ('name', 'age')


a = Student()
a.name = 'jack'
a.age = 10
print(a.name)


class ClassMate(Student):
    pass
a = ClassMate()
a.score = 5
print(a.score)